package java_thinking.unit_20._20_5;

import java_thinking.unit_20._20_1.DBTable;

/**
 * @Desc:   用反射测试AnnotationUse 的定义上是否有@DBTable
 * @author: cww
 * @DateTime: 2019-05-27 22:25
 */
@DBTable(name = "ff")
public class AnnotationUse {
    public static void main(String[] args) {
        if (AnnotationUse.class.isAnnotationPresent(DBTable.class)) {
            DBTable dbTable = AnnotationUse.class.getAnnotation(DBTable.class);
            System.out.println(dbTable.name());
        }
    }
}
